import "./nprogress.scss";

interface NProgressProps {
  max?: number | string;
  min?: number | string;
  progress: number;
  label?: string;
}
export const NProgress = ({
  max,
  min,
  progress,
  label,
  ...rest
}: NProgressProps) => {
  if (progress > 100) {
    throw new Error("progress must be between 0 to 100");
  }

  return (
    <>
      <div className="dashboard_n_progress" {...rest}>
        <div
          className="dashboard_nprogress_line"
          style={{
            width: `${progress}%`,
          }}
        ></div>
      </div>
    </>
  );
};
